<template>
    <div class="wrapper">
        <mt-header :title="isSuccess?'提现成功':'提现失败'" class="no-bg">
            <mt-button icon="back" slot="left" @click="$router.push('/account/wallet')"></mt-button>
        </mt-header>
        <div class="tips-box">
		    <div class="res-img"><img src="http://47.75.99.213/app/cdn/cash-success.png" style=""></div>
		    <div class="res-text text-1">{{ isSuccess?'提现成功':'提现失败' }}</div>
		    <div class="res-text text-2">{{ isSuccess?'我们将尽快给您充值到账':$route.query.res }}</div>
	    </div>
        <div class="res-btn" @click="changeToPath">{{ isSuccess?'查看订单详情':'返回我的钱包' }}</div>
    </div>
</template>

<script>
export default {
    name:'cash-succcess',
    data(){
        return{
            isSuccess:true
        }
    },
    mounted(){
        this.isSuccess = this.$route.query.isSuccess
    },
    methods:{
        changeToPath(){
            if( this.isSuccess ){
                // 提现成功：查看订单详情
                this.$router.push('/account/wallet/order');
            }else{
                // 提现失败：返回我的钱包
                this.$router.push('/account/wallet');
            }
        }
    }
}
</script>

<style lang="stylus" scoped>
.tips-box{
    .res-img{
        width:183px;
        height:115px;
        margin:0 auto;
        margin-top:87px;
    }
    .res-text{
        line-height:20px;
        text-align:center;
        &.text-1{
            font-size:28px;
            color:#666666;
            margin-top:11px;
        }
        &.text-2{
            font-size:18px;
            color:#B3B3B3;
            margin-top:30px;
        }
    }
}
.res-btn{
    font-size:18px;
    width:175px;
    height:44px;
    line-height 44px;
    text-align:center;
    color:rgba(255,255,255,1);
    background:linear-gradient(90deg,rgba(0,78,162,1),rgba(54,161,219,1));
    border-radius:22px;
    margin:0 auto;
    margin-top:78px;
}
</style>
